<script lang="ts" setup>
import { onMounted } from 'vue';
import { hideRightMenu } from './function/index'
hideRightMenu();

import {writeBinaryFile,BaseDirectory,createDir} from '@tauri-apps/api/fs' 

onMounted(async ()=>{
  await createDir('Notes',{dir:BaseDirectory.AppData, recursive: true})
  if(!localStorage.getItem('notes')){
    localStorage.setItem('notes','{"notes":[]}');
  }
})

import { WebviewWindow } from "@tauri-apps/api/window";
const cliboard = new WebviewWindow("cliboard",{
    title:"剪贴板",
    decorations:false,
    url:"/#/clipboard",
    width:400,
    height:430,
    alwaysOnTop:true,
    visible:false,
})

// const setting = new WebviewWindow("setting",{
//     title:"剪贴板",
//     decorations:false,
//     url:"/#/setting",
//     width:400,
//     height:430,
//     alwaysOnTop:true,
//     visible:true,
// })



</script>
<template>
    <router-view></router-view>
</template>
<style>
body{
  padding: 0;
  margin: 0;
  overflow: hidden;
}

p{
    margin: 0 !important;
}

</style>